package com.magic233.service;

import com.magic233.entity.OrderStatistical;
import com.magic233.entity.Orders;
import com.magic233.entity.Users;
import com.magic233.entity.Workers;

import java.util.List;
import java.util.Map;

/**
 * ClassName: OrdersService
 * Description:
 * date: 2021/5/29 21:13
 * author: zouyuan
 */
public interface OrdersService {
    //用户提交工单
    int addOrder(Users user, Orders order);

    //用户撤除工单
    int removeOrder(Users user, Long id);

    //管理员指派工单
    int sendOrder(Users user, Long id, Long wid);

    //维修人员接受工单
    int acceptOrder(Users user, Long id);

    //维修人员申请取消工单
    int cancelOrder(Users user, Long id, String workerReason);

    //管理员接受退单申请
    int handOrderYes(Users user, Long id);

    //管理员拒绝退单申请
    int handOrderNo(Users user, Long id, String adminReason);

    //维修人员确认维修完成
    int workerCompleteOrder(Users user, Long id, String consumable, String imgsfileids2);

    //用户确认完成
    int userCompleteOrder(Users user, Long id, String comment, Double score1, Double score2, Double score3);

    Map<Object, Object> selectOrders(Orders order, Integer pageNum, Integer pageSize);

    //查询工单数量
    Long selectCount(Orders order);

    int adminRemoveOrder(Users user, Long id);

    int setWorkernote(Users user, Long id, String workernote);

    boolean mark(Users user, Long[] ids);

    boolean cancelMark(Users user, Long[] ids);

    List<OrderStatistical> orderStatistical(Orders order);

    List<Workers> workerStatistical();

    Map<Object, Object> selectDeptOrders(Users user, Orders order, Integer pageNum, Integer pageSize);

    Map<Object, Object> selectOrdersWarn(Orders order, Integer pageNum, Integer pageSize);

    int systemAutoConfirm(Long id, Long uid, Long wid);

    int updateOrderStatusByWorkerDisable(Orders orders);
}
